package src.adiel.bgu;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;


public class HelloWorld extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.hello_world_layout);
        android.os.Bundle tHashBundle = this.getIntent().getExtras();
        if (tHashBundle != null){
        	String tUsername = tHashBundle.getString("userName");
        	if(tUsername != null){
        		android.widget.TextView tTextView = (TextView) this.findViewById(R.id.textField);
        		tTextView.setText("Hello " + tUsername + "!");
        		//cool
        	}
        	else{
        		System.out.println("Got null from tHashBundle.getString(\"username\")!");
        	}
        }
        else{
        	System.out.println("Got null from hash map!");
        }
    }
}